//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
//  //获取城市
//  export async function findByCity(params) {
//   return request({
//       url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/findByCity`,
//       method: 'GET',
//       data: params,
//   });
// };

//  //获取项目
//  export async function findByProject(params) {
//   return request({
//       url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/findByProject`,
//       method: 'GET',
//       data: params,
//   });
// };
//获取区域
export async function getProjectPermission(params) {
  return request({
      url: `${config.aheadPlan}system/login/getProjectPermission?userId=${params.userId}`,
      method: 'GET',
  });
};

export async function changeStatus(params) {
  return request({
      url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/changeStatus`,
      method: 'POST',
      data: params,
  });
};
export async function editFun(params) {
  return request({
      url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/edit`,
      method: 'GET',
      data: params,
  });
};
export async function deleteFun(params) {
  return request({
      url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/delete`,
      method: 'GET',
      data: params,
  });
};
export async function deleteHexin(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/delete`,
      method: 'DELETE',
      data: params,
  });
};

export async function findByPro(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/findByPro`,
      method: 'GET',
      data: params,
  });
};


//获取核心竞品
export async function getProjectByCompet(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/getProjectByCompet`,
      method: 'GET',
      data: params,
  });
};
 //获取城市
 export async function findByCity(params) {
  return request({
      url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/findByCity`,
      method: 'GET',
      data: params,
  });
};


